package com.ruoyi.demo.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.demo.domain.SysUser;
import com.ruoyi.demo.domain.TbBusiness;
import com.ruoyi.demo.domain.Vo;
import com.ruoyi.demo.service.SysUserService;
import com.ruoyi.demo.service.TbBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("shang")
@CrossOrigin
public class UserController {



    @Autowired
    SysUserService sysUserService;


    @Autowired
    TbBusinessService tbBusinessService;



    @RequestMapping("lists")
    public IPage<SysUser> list(Page<SysUser> page){
        return sysUserService.userList(page);
    }

   //商户列表
/*    @RequestMapping("lists")
    public IPage<TbBusiness> list(Page<TbBusiness> page){
        return tbBusinessService.userList(page);
    }*/



    @RequestMapping("sheng")
    public SysUser sheng(){
       return sysUserService.shengList();
    }



    @RequestMapping("he")
    public String he(Integer userId){
        return sysUserService.updateId(userId);
    }
}
